#include "ul_timer.h"
#include "ul_log_adapter.h"
#include <gtest/gtest.h>
#include <iostream>
using namespace LinuxNetworkUtility;
using namespace testing;
using namespace std;
int main()
{
  int64_t time_accuracy = 5000; /// 5 ms
  UlTimer time;
  EXPECT_EQ(time.init(time_accuracy),0);
  int64_t last = time.get_cur_time_us();
  int64_t now = 0;
  for (int i = 0; i < 1000; i++)
  {
    usleep(5000);
    now =  time.get_cur_time_us();
    cout<<now - last<<endl;
    last= now;
  }
  time.stop();
}
